package com.general.framework.aop.controller;

import org.aop.annotation.LogAnnotation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @LogAnnotation("添加用户")
    @GetMapping("/add")
    public void addUser(){
        System.out.println("add user");
    }
    @LogAnnotation("删除用户")
    @GetMapping("/delete/{id}")
    public void deleteUser(@PathVariable("id") int id){
        System.out.println("delete user");
    }
}
